
/*
 * @Author: wangliang
 * @Date: 2018-04-27
 * @description: 其他信息 --> 财务信息
*/

import { apiHttp } from '../../../apiHttp';
import Api from '../../../../api/company/comFinanceController.api';
import { ComFinanceDto, JsonResult } from '../../../../api/Interface';
import { CommonDto } from '../../../../service/subject/company/companyInterface';
export default {
    // 添加财务信息
    saveComFinance: async (comFinance: ComFinanceDto): Promise<JsonResult> => {
        const res: JsonResult = await apiHttp(Api.saveComFinance, comFinance);
        return res;
    },
    // 获取财务信息列表
    getComFinanceByCompanyId: async (comFinance: CommonDto): Promise<JsonResult> => {
        const res: JsonResult = await apiHttp(Api.getComFinanceByCompanyId, comFinance);
        return res;
    },
    // 根据id获取某一天财务信息
    getComFinanceById: async (getId: number): Promise<JsonResult> => {
        const res: JsonResult = await apiHttp(Api.getComFinanceById, {id: getId});
        return res;
    },
    // 编辑财务信息
    updateComFinance: async (comFinance: ComFinanceDto): Promise<JsonResult> => {
        const res: JsonResult = await apiHttp(Api.updateComFinance, comFinance);
        return res;
    },
    // 删除财务信息
    deleteComFinanceById: async (delId: number): Promise<JsonResult> => {
        const res: JsonResult = await apiHttp(Api.deleteComFinanceById, {id: delId});
        return res;
    },
    // 删除某一条审计公司
    deleteComFinanceAuditById: async (delId: number): Promise<JsonResult> => {
        const res: JsonResult = await apiHttp(Api.deleteComFinanceAuditById, {id: delId});
        return res;
    },
};